﻿{% extends "base.html" %}

{% block content %}

<script language="javascript" src="/static/js/jquery-1.2.1.pack.js" type="text/javascript"></script>
<script type="text/javascript" src="/static/js/jquery-calendar-pack.js" ></script>
<style type="text/css">@import url(/static/css/jquery-calendar.css);</style>
<script language="javascript" type="text/javascript">
$(document).ready
(
function()
{
    	popUpCal.regional['zh-cn'] = {
		dateFormat: 'YMD-'};
	popUpCal.setDefaults(popUpCal.regional['zh-cn']);
   $('#start_date').calendar({autoPopUp: 'focus',yearRange: '-10:+0'});
	$('#end_date').calendar({autoPopUp: 'focus',yearRange: '-10:+0'});

   });
 </script>

<div class="form-div">
  <form action="/csv/export/" name="searchForm" method='post'>
    <img src="/static/images/icon_search.gif" width="26" height="22" border="0" alt="SEARCH" />
	Program:<select name="p_id" id="p_id">
	<option value="0" {% ifequal p_id '0' %} selected="selected" {% endifequal %}>All</option>
{% for p in project_list %}
<option value="{{p.id}}" {% ifequal p.id p_id %} selected="selected" {% endifequal %}>{{p.name}}</option>
{% endfor %}
</select>

Agent:<select name="a_id" id="a_id" >
<option value="0" {% ifequal a_id '0' %} selected="selected" {% endifequal %}>All</option>
{% for a in agent_list %}
<option value="{{a.id}}" {% ifequal a.id a_id %} selected="selected" {% endifequal %}>{{a.name}}</option>
{% endfor %}
</select>
Sales:<input type="text" name="sales" id="sales" value="{{sales}}" {% ifequal level 'sales' %} readonly=true {% endifequal %}  />

Name:<input type="text" name="name" id="name" value="{{name}}" /><br />
&nbsp;&nbsp;&nbsp;&nbsp;Interest Level:<select name="interlevel" id="interlevel"><option value="all" {% ifequal interlevel 'all' %} selected="selected" {% endifequal %}>All</option><option value="0" {% ifequal interlevel '0' %} selected="selected" {% endifequal %}>Doesn't cantact yet</option><option value="1" {% ifequal interlevel '1' %} selected="selected" {% endifequal %}>High Interest</option><option value="2" {% ifequal interlevel '2' %} selected="selected" {% endifequal %}> Some Interest</option><option value="3" {% ifequal interlevel '3' %} selected="selected" {% endifequal %}>No Interest</option><option value="4" {% ifequal interlevel '4' %} selected="selected" {% endifequal %}>Consider next time</option></select>

Follow_up Status:<select name="status" id="status"><option value="all" {% ifequal status 'all' %} selected="selected" {% endifequal %}>All</option><option value="0" {% ifequal interlevel '0' %} selected="selected" {% endifequal %}>Doesn't cantact yet</option><option value="1" {% ifequal status '1' %} selected="selected" {% endifequal %}>Cannot be reached</option><option value="2" {% ifequal status '2' %} selected="selected" {% endifequal %}> Appointment scheduled</option><option value="3" {% ifequal status '3' %} selected="selected" {% endifequal %}>Under consideration</option><option value="4" {% ifequal status '4' %} selected="selected" {% endifequal %}>Please call later</option><option value="5" {% ifequal status '5' %} selected="selected" {% endifequal %}>Schedule conflict/next time</option><option value="6" {% ifequal status '6' %} selected="selected" {% endifequal %}>Don't call again</option><option value="7" {% ifequal status '7' %} selected="selected" {% endifequal %}> Enrolled</option></select><br />
&nbsp;&nbsp;&nbsp;&nbsp;From:<input type="text" id="start_date" name="start_date" value="{% if start_date %}{{start_date}}{% else %}begin{% endif %}" size="20" readonly="true"/>   To:<input type="text" id="end_date" name="end_date" value="{% if end_date %}{{end_date}}{% else %}now{% endif %}" size="20" readonly="true"/> 
<input type="submit" value="Export" class="button" />
  </form>
</div>

{% endblock %}